#include "stm32f10x.h"                  // Device header
#include "LED.h"
#include "G_Sensor.h"
#include "Delay.h"

int main(void)
{
	//模块初始化
	LED_Init();
	G_Sensor_Init();
	
	while(1)
	{
		if (G_Sensor_Get() == 0)    // 光被挡住应该是输出高电平
		{
			LED_ON();
			Delay_ms(3000);
			LED_OFF();
			Delay_ms(100);
		}
		else
		{
			LED_OFF();
		}
		
	}
}
